package com.lyf.practice.configread;

import org.junit.Test;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Properties;

/**
 * @author liyunfei
 */
public class PropertiesTests {
    @Test
    public void test1() throws FileNotFoundException {
        String filename = "E:\\JavaProjects\\LearnProjects\\learn-practice\\spring-base\\src\\main\\resources\\application.properties";
        Properties properties = new Properties();
        try {
            properties.load(new InputStreamReader(new FileInputStream(filename)));
            properties.forEach((k,v)->{
                System.out.println(k+":"+v);
            });
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    @Test
    public void test2(){
       // ScannerImpl scanner =new
    }
    
}
